package com.resifind.www.exception;

import com.resifind.www.constant.ErrorCode;

/**
 * @author 36069
 */
public class MerchantException extends BaseException{
    public MerchantException(ErrorCode errorCode) {
        super(errorCode);
    }

    public static MerchantException roomPriceError(){
        return new MerchantException(ErrorCode.MERCHANT_ROOM_PRICE_ERROR);
    }

    public static MerchantException roomNumError(){
        return new MerchantException(ErrorCode.MERCHANT_ROOM_NUMBERS_ERROR);
    }

    public static MerchantException updateSurplusError(){
        return new MerchantException(ErrorCode.MERCHANT_ROOM_UPDATE_SURPLUS_ERROR);
    }

    public static MerchantException roomNotAvailable(){
        return new MerchantException(ErrorCode.MERCHANT_ROOM_NOT_AVAILABLE);
    }

    public static MerchantException turnoverNotEnough(){
        return new MerchantException(ErrorCode.MERCHANT_TURNOVER_NOT_ENOUGH);
    }
}
